<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="pub/top_list2.jsp"%>   
<%
int orderid = Integer.valueOf(request.getParameter("orderid"));
int state = Integer.valueOf(request.getParameter("state"));

String sql = "select a.*,b.*,c.*,d.othername,e.classify,f.* from dingdan a,dingdanmx b,goodsx c,goodinfo d,shuxing e,manageadd f where a.orderid=? and a.orderid=b.orderid and a.state=? and b.goodsxID=c.goodsxID and a.addr=f.id and c.productid=d.productid and c.sxid=e.sxid";
Object[] params = new Object[2];
params[0] = orderid;
params[1] = state;
Map<String, Object> map = db.queryMap(sql, params);
%>

<body>
	<header class="top-header fixed-header">
		<a class="icona" href="javascript:history.go(-1)">
				<img src="images/left.png"/>
			</a>
		<h3>评价</h3>
		
	</header>
	
	<div class="contaniner fixed-cont">
		<section class="assess">
				<p>
					<img src="<%=map.get("sximg")%>"/>
					<textarea rows="5" placeholder="请写下对宝贝的感受吧，对他人帮助很大哦" ></textarea>
					
				</p>	
				<ul>
					<li>
						商品评价
					</li>
					<li class="assess-right">
						<img onclick="level(1)" src="images/detail-iocn01.png"/>
						<img onclick="level(2)" src="images/detail-iocn01.png"/>
						<img onclick="level(3)" src="images/detail-iocn01.png"/>
						<img onclick="level(4)" src="images/detail-iocn01.png"/>
						<img onclick="level(5)" src="images/detail-iocn01.png"/>
					</li>
				</ul>
		</section>
	</div>
	
	<footer class="assess-footer fixed-footer ">
		<ul>
			<li>
				<input type="checkbox" id="ass"/>
				<label for="ass" onselectstart="return false">匿名评价</label>
				
			</li>
			<input type="button" value="发表评论" />
		</ul>
	</footer>
	
	<script type="text/javascript">
		$(".assess-footer ul li label").on('touchstart',function(){
			if($(this).hasClass('assd')){
				$(".assess-footer ul li label").removeClass("assd")
			}else{
				$(".assess-footer ul li label").addClass("assd")
			};
		});
		function level(s)
{
	
	var str = '';

	var k = 6-s;
	
	for(i=1;i<s+1;i++)
	{	
		str += "<img onclick='level("+i+")' src='images/detail-iocn01.png'/>";
	}
	for(j=1;j<k;j++)
	{
		var d=j+s
		str += "<img onclick='level("+d+")' src='images/detail-iocn001.png'/>";
	}


	$('.assess-right').html(str);
}

		
	</script>
</body>
</html>